package org.ceteca.explica.client.installer;

import org.ceteca.explica.core.Hola1;
import org.ceteca.explica.core.Hola2;

public class Prueba {
	public void run() {
		System.out.println("################ EN LA PRUEBA ##############");
		ClassLoader cl = ClassLoader.getSystemClassLoader();
		if (cl instanceof ClientClassLoader)
			System.out.println("BIEEEEEEEEEEEEEEEEEEEEEEEN");
		else
			System.out.println("MAAAAAAAAAAAAAAAAAAAAAAAAL");
		
		try {
			Class.forName("org.ceteca.explica.core.Hola1", true, cl);
			System.out.println("Class Hola1 found!");
			
			
			Hola1 hola1 = (Hola1)Class.forName("org.ceteca.explica.core.Hola1", true, cl).newInstance();
			hola1.run();
			
			Hola2 hola2 = new Hola2();
			hola2.run();
		}
		catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}